package com.wmh.baseservice.user.pojo;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;

/**
 * @author wmh generator
 * @since 2022-09-14
 */
@ApiModel(value="UsGroupGoodsOrder对象", description="用户团购订单表")
public class UsGroupGoodsOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "状态: 0: 待支付 1: 待发货 2: 待收货(快递和配送都可以先发货然后用户收货, 自提无需发货)" +
            " 3: 待提货 4: 已提货, 商家已核验 5: 待评价 6: 已完成 -1: 已取消 -2: 已退款")
    private Integer status;

    @ApiModelProperty(value = "备注")
    private String remark;

    private Date createTime;

    private Date updateTime;

    @ApiModelProperty(value = "团购用户id")
    private Long usId;

    @ApiModelProperty(value = "跟团号")
    private Integer groupNo;

    @ApiModelProperty(value = "团购商品id")
    private Long groupGoodsId;

    @ApiModelProperty(value = "规格id")
    private Long specId;

    @ApiModelProperty(value = "唯一订单号")
    private String orderNo;

    @ApiModelProperty(value = "商品快照")
    private String snapshot;

    @ApiModelProperty(value = "总价(应付价格)")
    private BigDecimal totalPrice;

    @ApiModelProperty(value = "实付价格")
    private BigDecimal realPrice;

    @ApiModelProperty(value = "收货地址id")
    private Long addressId;

    @ApiModelProperty(value = "支付时间")
    private Date payTime;

    @ApiModelProperty(value = "快递单号")
    private String expressNumber;

    @ApiModelProperty(value = "商家id")
    private Long merchantId;

    @ApiModelProperty(value = "订单二维码，提货可用")
    private String qrCode;

    @ApiModelProperty(value = "0自提 1快递 3配送")
    private Integer type;

    @ApiModelProperty(value = "返现的金额")
    private BigDecimal cashBack;

    @ApiModelProperty(value = "购买的重量/数量")
    private Integer count;

    @ApiModelProperty(value = "运费")
    private BigDecimal freightPrice;

    @ApiModelProperty(value = "支付类型1余额支付 2微信支付")
    private Integer payType;

    @ApiModelProperty(value = "售后状态:	0:未申请售后	1:申请退款中	2:退款完成	")
    private Integer afterSaleStatus;

    @ApiModelProperty(value = "收货时间/提货时间")
    private Date deliveryTime;

    @ApiModelProperty(value = "团购批号")
    private Integer batch;

    @ApiModelProperty(value = "是否已由商家结算	0：未结算	-1：订单完成未结算金额	1：订单完成已结算金额")
    private Integer hasSettlement;

    @ApiModelProperty(value = "订单佣金是否结算	0：未结算	-1：订单已完成但未结算佣金	1：订单完成已结算佣金")
    private Integer hasCommission;

    public Long getId() {
        return id;
    }

    public UsGroupGoodsOrder setId(Long id) {
        this.id = id;
        return this;
    }
    public Integer getStatus() {
        return status;
    }

    public UsGroupGoodsOrder setStatus(Integer status) {
        this.status = status;
        return this;
    }
    public String getRemark() {
        return remark;
    }

    public UsGroupGoodsOrder setRemark(String remark) {
        this.remark = remark;
        return this;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public UsGroupGoodsOrder setCreateTime(Date createTime) {
        this.createTime = createTime;
        return this;
    }
    public Date getUpdateTime() {
        return updateTime;
    }

    public UsGroupGoodsOrder setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
        return this;
    }
    public Long getUsId() {
        return usId;
    }

    public UsGroupGoodsOrder setUsId(Long usId) {
        this.usId = usId;
        return this;
    }
    public Long getGroupGoodsId() {
        return groupGoodsId;
    }

    public UsGroupGoodsOrder setGroupGoodsId(Long groupGoodsId) {
        this.groupGoodsId = groupGoodsId;
        return this;
    }
    public Long getSpecId() {
        return specId;
    }

    public UsGroupGoodsOrder setSpecId(Long specId) {
        this.specId = specId;
        return this;
    }
    public String getOrderNo() {
        return orderNo;
    }

    public UsGroupGoodsOrder setOrderNo(String orderNo) {
        this.orderNo = orderNo;
        return this;
    }
    public String getSnapshot() {
        return snapshot;
    }

    public UsGroupGoodsOrder setSnapshot(String snapshot) {
        this.snapshot = snapshot;
        return this;
    }
    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public UsGroupGoodsOrder setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
        return this;
    }
    public BigDecimal getRealPrice() {
        return realPrice;
    }

    public UsGroupGoodsOrder setRealPrice(BigDecimal realPrice) {
        this.realPrice = realPrice;
        return this;
    }
    public Long getAddressId() {
        return addressId;
    }

    public UsGroupGoodsOrder setAddressId(Long addressId) {
        this.addressId = addressId;
        return this;
    }
    public Date getPayTime() {
        return payTime;
    }

    public UsGroupGoodsOrder setPayTime(Date payTime) {
        this.payTime = payTime;
        return this;
    }
    public String getExpressNumber() {
        return expressNumber;
    }

    public UsGroupGoodsOrder setExpressNumber(String expressNumber) {
        this.expressNumber = expressNumber;
        return this;
    }
    public Long getMerchantId() {
        return merchantId;
    }

    public UsGroupGoodsOrder setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
        return this;
    }
    public String getQrCode() {
        return qrCode;
    }

    public UsGroupGoodsOrder setQrCode(String qrCode) {
        this.qrCode = qrCode;
        return this;
    }
    public Integer getType() {
        return type;
    }

    public UsGroupGoodsOrder setType(Integer type) {
        this.type = type;
        return this;
    }
    public BigDecimal getCashBack() {
        return cashBack;
    }

    public UsGroupGoodsOrder setCashBack(BigDecimal cashBack) {
        this.cashBack = cashBack;
        return this;
    }
    public Integer getCount() {
        return count;
    }

    public UsGroupGoodsOrder setCount(Integer count) {
        this.count = count;
        return this;
    }
    public BigDecimal getFreightPrice() {
        return freightPrice;
    }

    public UsGroupGoodsOrder setFreightPrice(BigDecimal freightPrice) {
        this.freightPrice = freightPrice;
        return this;
    }
    public Integer getPayType() {
        return payType;
    }

    public UsGroupGoodsOrder setPayType(Integer payType) {
        this.payType = payType;
        return this;
    }
    public Integer getAfterSaleStatus() {
        return afterSaleStatus;
    }

    public UsGroupGoodsOrder setAfterSaleStatus(Integer afterSaleStatus) {
        this.afterSaleStatus = afterSaleStatus;
        return this;
    }
    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public UsGroupGoodsOrder setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
        return this;
    }
    public Integer getBatch() {
        return batch;
    }

    public UsGroupGoodsOrder setBatch(Integer batch) {
        this.batch = batch;
        return this;
    }
    public Integer getHasSettlement() {
        return hasSettlement;
    }

    public UsGroupGoodsOrder setHasSettlement(Integer hasSettlement) {
        this.hasSettlement = hasSettlement;
        return this;
    }

    public Integer getHasCommission() {
        return hasCommission;
    }

    public UsGroupGoodsOrder setHasCommission(Integer hasCommission) {
        this.hasCommission = hasCommission;
        return this;
    }

    public static final String ID = "id";

    public static final String STATUS = "status";

    public static final String REMARK = "remark";

    public static final String VERSION = "version";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_TIME = "update_time";

    public static final String US_ID = "us_id";

    public static final String GROUP_GOODS_ID = "group_goods_id";

    public static final String SPEC_ID = "spec_id";

    public static final String ORDER_NO = "order_no";

    public static final String SNAPSHOT = "snapshot";

    public static final String TOTAL_PRICE = "total_price";

    public static final String REAL_PRICE = "real_price";

    public static final String ADDRESS_ID = "address_id";

    public static final String PAY_TIME = "pay_time";

    public static final String EXPRESS_NUMBER = "express_number";

    public static final String MERCHANT_ID = "merchant_id";

    public static final String QR_CODE = "qr_code";

    public static final String TYPE = "type";

    public static final String CASH_BACK = "cash_back";

    public static final String COUNT = "count";

    public static final String FREIGHT_PRICE = "freight_price";

    public static final String PAY_TYPE = "pay_type";

    public static final String AFTER_SALE_STATUS = "after_sale_status";

    public static final String DELIVERY_TIME = "delivery_time";

    public static final String BATCH = "batch";

    public static final String HAS_SETTLEMENT = "has_settlement";

    public static final String HAS_COMMISSION = "has_commission";

    @Override
    public String toString() {
        return "UsGroupGoodsOrder{" +
            "id=" + id +
            ", status=" + status +
            ", remark=" + remark +
            ", createTime=" + createTime +
            ", updateTime=" + updateTime +
            ", usId=" + usId +
            ", groupGoodsId=" + groupGoodsId +
            ", specId=" + specId +
            ", orderNo=" + orderNo +
            ", snapshot=" + snapshot +
            ", totalPrice=" + totalPrice +
            ", realPrice=" + realPrice +
            ", addressId=" + addressId +
            ", payTime=" + payTime +
            ", expressNumber=" + expressNumber +
            ", merchantId=" + merchantId +
            ", qrCode=" + qrCode +
            ", type=" + type +
            ", cashBack=" + cashBack +
            ", count=" + count +
            ", freightPrice=" + freightPrice +
            ", payType=" + payType +
            ", afterSaleStatus=" + afterSaleStatus +
            ", deliveryTime=" + deliveryTime +
            ", batch=" + batch +
            ", hasSettlement=" + hasSettlement +
        "}";
    }

    public final static String[] getFields(String ...noField){
        List<String> list = new ArrayList<>(Arrays.asList(
            UsGroupGoodsOrder.ID
            ,UsGroupGoodsOrder.STATUS
            ,UsGroupGoodsOrder.REMARK
            ,UsGroupGoodsOrder.CREATE_TIME
            ,UsGroupGoodsOrder.UPDATE_TIME
            ,UsGroupGoodsOrder.US_ID
            ,UsGroupGoodsOrder.GROUP_GOODS_ID
            ,UsGroupGoodsOrder.SPEC_ID
            ,UsGroupGoodsOrder.ORDER_NO
            ,UsGroupGoodsOrder.SNAPSHOT
            ,UsGroupGoodsOrder.TOTAL_PRICE
            ,UsGroupGoodsOrder.REAL_PRICE
            ,UsGroupGoodsOrder.ADDRESS_ID
            ,UsGroupGoodsOrder.PAY_TIME
            ,UsGroupGoodsOrder.EXPRESS_NUMBER
            ,UsGroupGoodsOrder.MERCHANT_ID
            ,UsGroupGoodsOrder.QR_CODE
            ,UsGroupGoodsOrder.TYPE
            ,UsGroupGoodsOrder.CASH_BACK
            ,UsGroupGoodsOrder.COUNT
            ,UsGroupGoodsOrder.FREIGHT_PRICE
            ,UsGroupGoodsOrder.PAY_TYPE
            ,UsGroupGoodsOrder.AFTER_SALE_STATUS
            ,UsGroupGoodsOrder.DELIVERY_TIME
            ,UsGroupGoodsOrder.BATCH
            ,UsGroupGoodsOrder.HAS_SETTLEMENT
        ));
        list.removeAll(new ArrayList<>(Arrays.asList(noField)));
        return list.toArray(new String[0]);
    }
}